﻿namespace CSharpPro._1020;

public class Student
{
    public string Name { get; set; }
    public int Age { get; set; }
    public string Class { get; set; }
    
    public Student(string name, int age, string className)
    {
        Name = name;
        Age = age;
        Class = className;
    }
    
    public void DisplayInfo()
    {
        Console.WriteLine($"姓名：{Name}，年龄：{Age}，班级：{Class}");
    }
}
